{template header}

<!--{if $webglobal['action'] == 'view'}-->
	{templatecss thickbox}
	<script type="text/javascript" src="{WEBURLPATH}/javascript/thickbox.js"></script>
	<script type="text/javascript" src="http://ditu.google.cn/maps/api/js?sensor=false"></script>
	<div id="positionBox">
		<div class="left">
			<a href="{WEBURLPATH}/index.php">首页</a>&gt;
			<a href="{WEBURLPATH}/company.php">热门商铺</a>
		</div>
	</div>
	<div id="companyInfoBox">
		<div class="companyInfo">
			<div class="linetitle">商铺详情</div>
			<!--{if !empty($webglobal['file_company']['companyData']['company']['image'])}--><img class="img" src="{WEBURLPATH}{$webglobal['file_company']['companyData']['company']['thumbnail']['middle']}" alt="" /><!--{else}--><img class="img" src="{WEBURLPATH}/images/nopic-big.png" alt="" /><!--{/if}-->
			<div class="fcnbig fstrong">
				<!--{if !empty($webglobal['file_company']['companyData']['company']['name'])}-->
					{$webglobal['file_company']['companyData']['company']['name']}
					<!--{if !empty($webglobal['file_company']['companyData']['company']['english_name'])}-->
						({$webglobal['file_company']['companyData']['company']['english_name']})
					<!--{/if}-->
				<!--{else}-->
					{$webglobal['file_company']['companyData']['company']['english_name']}
				<!--{/if}-->
			</div>
			<span class="address">
				<div class="star_rating" title="{$webglobal['file_company']['companyData']['score_avg']}分" alt="{$webglobal['file_company']['companyData']['score_avg']}分"><span id="article_show_rateper_count" class="star_rating_cur" style="width: {echo $webglobal['file_company']['companyData']['score_avg']*20}%" >{$webglobal['file_company']['companyData']['company']['score']}</span></div>
				<strong>商圈:</strong> 
					<!--{if $webglobal['file_company']['companyData']['company']['city']>0}-->{$webglobal['areadata'][$webglobal['file_company']['companyData']['company']['city']]['name']}&nbsp;&gt;&nbsp;<!--{/if}-->
					<!--{if $webglobal['file_company']['companyData']['company']['district']>0}-->{$webglobal['areadata'][$webglobal['file_company']['companyData']['company']['district']]['name']}&nbsp;&gt;&nbsp;<!--{/if}-->
					<!--{if $webglobal['file_company']['companyData']['company']['area_id']>0}-->{$webglobal['areadata'][$webglobal['file_company']['companyData']['company']['area_id']]['name']}<!--{/if}--><br />
				<strong>地址:</strong> {$webglobal['file_company']['companyData']['company']['address']}<br />
				<strong>电话:</strong> {$webglobal['file_company']['companyData']['company']['tel']}
			</span>
			<!--{if $webglobal['file_company']['companyData']['company']['latitude']!=0 || $webglobal['file_company']['companyData']['company']['longitude']!=0}-->
				<a href="{WEBURLPATH}/company.php?action=viewmap&id={$webglobal['file_company']['companyData']['company']['id']}&KeepThis=true&TB_iframe=true&height=420&width=595" title="查看地图" class="thickbox map">地图</a>
			<!--{/if}-->
			<p>{$webglobal['file_company']['companyData']['company']['description']}</p>
			<a href="{WEBURLPATH}/company.php?action=collect&id={$webglobal['file_company']['companyData']['company']['id']}" id="favorite" class="collect" style="margin-top: 0px">收藏</a>
		</div>
		<div class="clear"></div>
		<div class="blankline"></div>
		<div class="blocktitle"><strong>商铺发布的优惠券</strong><span></span></div><div class="clear"></div>
		{if $webglobal['file_coupon']['datanum']}
		<ul class="companyCoupon">
			{loop $webglobal['file_coupon']['dataarray'] $coupid $coupon}
			<li>
				<a href="{WEBURLPATH}/coupon.php?action=view&id={$coupon['id']}" class="img"><!--{if !empty($coupon['image'])}--><img src="{WEBURLPATH}{$coupon['thumbnail']['small']}" alt="" /><!--{else}--><img src="{WEBURLPATH}/images/no_coupon.gif" alt="" width="205" height="133" /><!--{/if}--></a>
				<span class="priceBefore">折前￥{$coupon['original']}</span>
				<span class="priceAfter">{$coupon['price']}</span>
				<p class="tit"><a href="{WEBURLPATH}/coupon.php?action=view&id={$coupon['id']}">{$coupon['name']}</a>有效期为：{$coupon['endtime_show']}</p>
				<p class="abstract">{$coupon['introduction']}</p>
			</li>
			{/loop}
			<div class="clear"></div>
			<div class="blankline"></div>
			{template page}
		</ul>
		{else}
			<br /><br /><p>该商家还没有发布任何优惠劵信息.</p>
		{/if}
		
	</div>
	
	
	<div class="couponRight">
		<!--{if $webglobal['file_company']['companyData']['company']['latitude']!=0 || $webglobal['file_company']['companyData']['company']['longitude']!=0}-->
			<div class="companyMapBox">
				<div id="map_canvas_edit" style="width:212px; height:210px;"></div>
				<script type="text/javascript">
						var cur_latitude = {$webglobal['file_company']['companyData']['company']['latitude']};
						var cur_longitude = {$webglobal['file_company']['companyData']['company']['longitude']};
						var cur_latlng = new google.maps.LatLng({$webglobal['file_company']['companyData']['company']['latitude']}, {$webglobal['file_company']['companyData']['company']['longitude']});
						var cur_default_latlng = new google.maps.LatLng(35.22354439383212, 103.93229484558105);
						var cur_default_zoom = 4;
						var map;
						var new_marker;
						function map_initialize(latlng, zoom)
						{
							$("#map_canvas_edit").show();
							var myOptions = {
									zoom: zoom,
									center: latlng,
									mapTypeControl: false,
									//navigationControl: false,
									streetViewControl: false,
									mapTypeId: google.maps.MapTypeId.ROADMAP
								};
							map = new google.maps.Map(document.getElementById("map_canvas_edit"), myOptions);
						}
						function show_map()
						{
							if (cur_latitude!=0 || cur_longitude!=0)
							{
								map_initialize(cur_latlng, 14);
								var cur_marker = new google.maps.Marker({map: map, position: cur_latlng, icon: WEBURLPATH+'/images/mapflag.png'});
							}
						}
						$(document).ready(function(){show_map();});
					</script>
			</div>
		<!--{/if}-->
		<div class="couponHotNews">
			<div class="tit"><a class="left">热门新闻</a></div>
			<ul class="cont">
				{loop $webglobal['file_company']['hot'] $article}
				<li><a href="{$article['arcurl']}">{$article['title']}</a></li>
				{/loop}
			</ul>
		</div>
	</div>
<!--{else}-->
	<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		$("#companySortBox .leftNav li").hover(
			function(){
				$(this).addClass("current");
				$(this).find(".leftSubNav").css("top",$(this).index()*28+91);
				$(this).find(".leftSubNav").show();
			},
			function(){
				$(this).removeClass("current");
				$(this).find(".leftSubNav").hide();
			}
		);
	});
	</script>

	<div id="positionBox">
		<div class="left">
			<a href="{WEBURLPATH}/index.php">首页</a>&gt;
			<a href="{WEBURLPATH}/company.php">热门商铺</a>
		</div>
	</div>

	<div class="mainarea">
		<div class="left">
			<div id="companySortBox">
				<dl>
					<dt><a href="{$webglobal['file_company']['allCategoryUrl']}">商铺分类</a></dt>
					<dd>
						<ul class="leftNav">
						{loop $webglobal['companyCategory'] $categoryid $category}
							<li>
								<a href="{$category[url]}"{if in_array($categoryid, $webglobal['file_company']['selectcategory'])} class="select"{/if}>{$category[name]}</a>
								{if $category[second]}
								<ul class="leftSubNav">
								{loop $category[second] $subcategoryid $subcategory}
									<li><a href="{$subcategory['url']}"{if in_array($subcategoryid, $webglobal['file_company']['selectcategory'])} class="select"{/if}>{$subcategory[name]}</a></li>
								{/loop}
								</ul>
								{/if}
							</li>
						{/loop}
						{if $webglobal[file_company][areadata]}
							<li>
								<a href="{$webglobal['file_company']['allAreaUrl']}" class="current">全部商圈</a>
							</li>
							{loop $webglobal[file_company][areadata] $areaid $area}
							<li>
								<a href="{$area[url]}"{if in_array($areaid, $webglobal['file_company']['selectarea'])} class="select"{/if}>{$area[name]}</a>
								{if $area[second]}
								<ul class="leftSubNav">
								{loop $area[second] $subareaid $subarea}
									<li><a href="{$subarea['url']}"{if in_array($subareaid, $webglobal['file_company']['selectarea'])} class="select"{/if}>{$subarea[name]}</a></li>
								{/loop}
								</ul>
								{/if}
							</li>
							{/loop}
						{/if}
						</ul>
					</dd>
				</dl>
			</div>
			<div class="couponLeftProBox"><img src="{WEBURLPATH}/images/ad06.jpg" alt="" /></div>
		</div>
		<div class="topContMid">
			<div class="couponSearchBox">
				<form method="post" name="search" id="search" action="{WEBURLPATH}/company.php" class="left">
					{loop $webglobal['file_company']['urlParams'] $field $value}
					{if $field != 's'}
					<input type="hidden" name="{$field}" value="{$value}" />
					{/if}
					{/loop}
					<input class="txtIpt" type="text" name="s" value="{$webrequest['s']}" />
					<input class="btnIpt" type="submit" value="" />
				</form>
				<div class="right">
					每页显示：
					{loop $webglobal['file_company']['pageLimit'] $pagelimit}
					<a href="{$pagelimit[url]}"{if $pagelimit['checked']} class="checked"{/if}>$pagelimit[title]</a>
					{/loop}
				</div>
			</div>
			{if $webglobal['file_company']['datanum'] > 0}
				<ul class="couponList">
					{loop $webglobal['file_company']['dataarray'] $tempkey $tempdata}
					<li>
						<a href="{WEBURLPATH}/company.php?action=view&id={$tempdata[id]}" class="img" style="margin-right: 10px">{if !empty($tempdata['image'])}<img src="{WEBURLPATH}/{$tempdata['thumbnail']['big']}" alt="" />{else}<img src="{WEBURLPATH}/images/nopic.png" alt="" />{/if}</a>
						<div style="line-height:20px;">
								<div class="fbig fstrong">
								<a href="{WEBURLPATH}/company.php?action=view&id={$tempdata[id]}">
								<!--{if !empty($tempdata['name'])}-->
									{$tempdata['name']}
									<!--{if !empty($tempdata['english_name'])}-->
										({$tempdata['english_name']})
									<!--{/if}-->
								<!--{else}-->
									{$tempdata['english_name']}
								<!--{/if}-->
								</a>
							</div>
							<div><strong>商圈:</strong> 
								<!--{if $tempdata['city']>0}-->{$webglobal['areadata'][$tempdata['city']]['name']}&nbsp;&gt;&nbsp;<!--{/if}-->
								<!--{if $tempdata['district']>0}-->{$webglobal['areadata'][$tempdata['district']]['name']}&nbsp;&gt;&nbsp;<!--{/if}-->
								<!--{if $tempdata['area_id']>0}-->{$webglobal['areadata'][$tempdata['area_id']]['name']}<!--{/if}-->
							</div>
							<div><strong>地址:</strong> {$tempdata['address']}</div>
							<div><strong>电话:</strong> {$tempdata['tel']}</div>
							<p>{$tempdata['description']}</p>
						</div>
					</li>
					{/loop}
				</ul>
				{template page}
			{else}
				<div class="noResult">
					<p class="tip">没有找到满足条件的商铺信息，试试重新搜索：</p>
					<p class="Color7">• 确认拼写没有错误</p>
					<p class="Color7">• 确认频道没有选错</p>
					<p class="Color7">• 精简查询内容，尽量使用最主要的字词</p>
				</div>
			{/if}
		</div>
		<div class="topContRight">
			<div class="topRightProBoxc"><img src="{WEBURLPATH}/images/ad07.jpg" alt="" /></div><br />
			<div class="topRightProBoxa"><img src="images/toprightproa.gif" alt="" /></div>
			<div class="couponHotNews">
				<div class="tit"><a class="left">热门新闻</a></div>
				<ul class="cont">
					{loop $webglobal['file_company']['hot'] $article}
					<li><a href="{$article['arcurl']}">{$article['title']}</a></li>
					{/loop}
				</ul>
			</div>
		</div>
		
	</div>
<!--{/if}-->
{template footer}